import {ElMessageBox} from "element-plus";

export function elConfirm(message,
                          type = 'warning',
                          title = '注意',
                          draggable = true,
                          confirmButtonLabel = '确认，我很坚定',
                          cancelButtonLabel = '取消，我后悔了') {
    return ElMessageBox.confirm(message, title, {
        confirmButtonText: confirmButtonLabel,
        cancelButtonText: cancelButtonLabel,
        type: type,
        draggable: draggable
    }).then(() => true).catch(() => false);
}